package com.heima.thread;

import java.util.concurrent.FutureTask;

public class ThreadYouXianJiText01 {
    public static void main(String[] args) {
        ThreadYouXianJi01 T=new ThreadYouXianJi01();
        FutureTask<String> F=new FutureTask<>(T);
        Thread th=new Thread(F);
        th.setName("大炮");
       // System.out.println(th.getPriority());//默认优先级5
        th.setPriority(10);//设置优先级，优先级范围最大优先级10，最小1，默认5
         th.start();
        ThreadYouXianJi01 T1=new ThreadYouXianJi01();
        FutureTask<String> F1=new FutureTask<>(T);
        Thread th1=new Thread(F1);
        th1.setName("枪");
        //System.out.println(th1.getPriority());//优先级
        th1.setPriority(1);
        th1.start();
    }
}
